﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class View_ViewComment : System.Web.UI.UserControl
{
    CommentBus cmtBus;
    protected void Page_Load(object sender, EventArgs e)
    {
        cmtBus = new CommentBus();
        LoadComment();
    }
    public void LoadComment() 
    {
        try
        {
            int article_id = Convert.ToInt32(Request.QueryString["id"].ToString());
            DataTable dt = cmtBus.getCommentIsTrue(article_id);
            Session["countComment"] = dt.Rows.Count;
            listComment.DataSource = dt;
            listComment.DataBind();
        }
        catch (Exception e) {
        }
    }
}